package com.googlecode.monitoring.ws.model;

/**
 * Author: Sergiy Doroshenko
 * Date: Jun 15, 2010
 * Time: 1:37:20 PM
 */
public class CfpContext {
	private String modelId;
	private String channelId;

	public CfpContext() {
		super();
	}

	public CfpContext(String modelId, String channelId) {
		this.modelId = modelId;
		this.channelId = channelId;
	}

	public String getModelId() {
		return modelId;
	}

	public void setModelId(String modelId) {
		this.modelId = modelId;
	}

	public String getChannelId() {
		return channelId;
	}

	public void setChannelId(String channelId) {
		this.channelId = channelId;
	}

	@Override
	public String toString() {
		return "CfpContext{" +
			"modelId='" + modelId + '\'' +
			", channelId='" + channelId + '\'' +
			'}';
	}

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof CfpContext)) return false;

        CfpContext that = (CfpContext) o;

        if (channelId != null ? !channelId.equals(that.channelId) : that.channelId != null) return false;
        if (modelId != null ? !modelId.equals(that.modelId) : that.modelId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = modelId != null ? modelId.hashCode() : 0;
        result = 31 * result + (channelId != null ? channelId.hashCode() : 0);
        return result;
    }
}
